package com.le.tester.javaThink.fifth.chapter24_ConcurrentProgramming;

import java.util.concurrent.CompletableFuture;
import java.util.concurrent.ExecutionException;

/**
 * createTime：2021/8/20 15:36
 * description：CompletableUtilities
 */
public class CompletableUtilities {
    public static void showr(CompletableFuture<?> c) {
        try {
            System.out.println(c.get());
        } catch (InterruptedException | ExecutionException e) {
            throw new RuntimeException(e.getMessage());
        }
    }

    public static void voidr(CompletableFuture<Void> c) {
        try {
            c.get();
        } catch (InterruptedException | ExecutionException e) {
            throw new RuntimeException(e.getMessage());
        }

    }
}
